home *** CD-ROM | disk | FTP | other *** search
/ Windows Expert / Windows Expert.iso / windownt / mapmem.zip / DEVIOCTL.H next >
C/C++ Source or Header  |  1992-11-01  |  4KB  |  108 lines

  1. /*++ BUILD Version: 0004    // Increment this if a change has global effects
  2.  
  3. Copyright (c) 1992  Microsoft Corporation
  4.  
  5. Module Name:
  6.  
  7.     devioctl.h
  8.  
  9. Abstract:
  10.  
  11.     This module contains
  12.  
  13.  
  14. --*/
  15.  
  16. // begin_winioctl
  17.  
  18. #ifndef _DEVIOCTL_
  19. #define _DEVIOCTL_
  20.  
  21. // begin_ntddk
  22. //
  23. // Define the various device type values.  Note that values used by Microsoft
  24. // Corporation are in the range 0-32767, and 32768-65535 are reserved for use
  25. // by customers.
  26. //
  27.  
  28. #define DEVICE_TYPE ULONG
  29.  
  30. #define FILE_DEVICE_BEEP                0x00000001
  31. #define FILE_DEVICE_CD_ROM              0x00000002
  32. #define FILE_DEVICE_CD_ROM_FILE_SYSTEM  0x00000003
  33. #define FILE_DEVICE_CONTROLLER          0x00000004
  34. #define FILE_DEVICE_DATALINK            0x00000005
  35. #define FILE_DEVICE_DFS                 0x00000006
  36. #define FILE_DEVICE_DISK                0x00000007
  37. #define FILE_DEVICE_DISK_FILE_SYSTEM    0x00000008
  38. #define FILE_DEVICE_FILE_SYSTEM         0x00000009
  39. #define FILE_DEVICE_INPORT_PORT         0x0000000a
  40. #define FILE_DEVICE_KEYBOARD            0x0000000b
  41. #define FILE_DEVICE_MAILSLOT            0x0000000c
  42. #define FILE_DEVICE_MIDI_IN             0x0000000d
  43. #define FILE_DEVICE_MIDI_OUT            0x0000000e
  44. #define FILE_DEVICE_MOUSE               0x0000000f
  45. #define FILE_DEVICE_MULTI_UNC_PROVIDER  0x00000010
  46. #define FILE_DEVICE_NAMED_PIPE          0x00000011
  47. #define FILE_DEVICE_NETWORK             0x00000012
  48. #define FILE_DEVICE_NETWORK_BROWSER     0x00000013
  49. #define FILE_DEVICE_NETWORK_FILE_SYSTEM 0x00000014
  50. #define FILE_DEVICE_NULL                0x00000015
  51. #define FILE_DEVICE_PARALLEL_PORT       0x00000016
  52. #define FILE_DEVICE_PHYSICAL_NETCARD    0x00000017
  53. #define FILE_DEVICE_PRINTER             0x00000018
  54. #define FILE_DEVICE_SCANNER             0x00000019
  55. #define FILE_DEVICE_SERIAL_MOUSE_PORT   0x0000001a
  56. #define FILE_DEVICE_SERIAL_PORT         0x0000001b
  57. #define FILE_DEVICE_SCREEN              0x0000001c
  58. #define FILE_DEVICE_SOUND               0x0000001d
  59. #define FILE_DEVICE_STREAMS             0x0000001e
  60. #define FILE_DEVICE_TAPE                0x0000001f
  61. #define FILE_DEVICE_TAPE_FILE_SYSTEM    0x00000020
  62. #define FILE_DEVICE_TRANSPORT           0x00000021
  63. #define FILE_DEVICE_UNKNOWN             0x00000022
  64. #define FILE_DEVICE_VIDEO               0x00000023
  65. #define FILE_DEVICE_VIRTUAL_DISK        0x00000024
  66. #define FILE_DEVICE_WAVE_IN             0x00000025
  67. #define FILE_DEVICE_WAVE_OUT            0x00000026
  68. #define FILE_DEVICE_8042_PORT           0x00000027
  69.  
  70. //
  71. // Macro definition for defining IOCTL and FSCTL function control codes.  Note
  72. // that function codes 0-2047 are reserved for Microsoft Corporation, and
  73. // 2048-4095 are reserved for customers.
  74. //
  75.  
  76. #define CTL_CODE( DeviceType, Function, Method, Access ) (                 \
  77.     ((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method) \
  78. )
  79.  
  80. //
  81. // Define the method codes for how buffers are passed for I/O and FS controls
  82. //
  83.  
  84. #define METHOD_BUFFERED                 0
  85. #define METHOD_IN_DIRECT                1
  86. #define METHOD_OUT_DIRECT               2
  87. #define METHOD_NEITHER                  3
  88.  
  89. //
  90. // Define the access check value for any access
  91. //
  92. //
  93. // The FILE_READ_ACCESS and FILE_WRITE_ACCESS constants are also defined in
  94. // ntioapi.h as FILE_READ_DATA and FILE_WRITE_DATA. The values for these
  95. // constants *MUST* always be in sync.
  96. //
  97.  
  98.  
  99. #define FILE_ANY_ACCESS                 0
  100. #define FILE_READ_ACCESS          ( 0x0001 )    // file & pipe
  101. #define FILE_WRITE_ACCESS         ( 0x0002 )    // file & pipe
  102.  
  103. // end_ntddk
  104.  
  105. #endif // _DEVIOCTL_
  106.  
  107. // end_winioctl
  108.